home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / jasperProperties.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  34.9 KB  |  1,231 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // ================= Properties for each section =====================
  18.  
  19. global float    $jasperBigFloat = 100000000.0;
  20.  
  21. global proc jasperStampProfileProperties( 
  22.     string $jasperMode, 
  23.     string $currentTool
  24. )
  25. {
  26.     global float    $jasperBigFloat;
  27.  
  28.     //
  29.     //    Profile frameLayout
  30.     //
  31.        frameLayout -l "Stamp Profile" -la "center" -li 5 
  32.                 -bs "etchedIn" -collapse false -collapsable false;
  33.     columnLayout;
  34.         separator -h 5 -style "none";
  35.         rowColumnLayout -nc 2 -cw 1 267 -cw 2 60 -cs 1 5 -cs 2 5;
  36.             // The upper slider/field bounds are determined by compensation
  37.             // mode. They are set in jasperValues.mel
  38.             //
  39.             floatSliderGrp -field true -l "Radius(U)" -cal 1 "right"
  40.                 -pre 3 -min 0 -step 0.05 -cw3 72 55 140 radius;
  41.             text -al "left" -l "" radiusUnits;
  42.  
  43.             floatSliderGrp -field true -l "Radius(L)" -cal 1 "right"
  44.                 -pre 3 -min 0 -step 0.05 -cw3 72 55 140 lowerRadius;
  45.             text -al "left" -l "" lowerRadiusUnits;
  46.  
  47.             if ( ($currentTool != "selectPaint") && ($currentTool != "setEditPaint")) { 
  48.                 // opacity slider
  49.                 //
  50.                 floatSliderGrp -field true -l "Opacity" 
  51.                     -cal 1 "right" -pre 3 
  52.                     -min 0.0 -max 1.0 -step 0.05 
  53.                     -cw3 72 55 140 opacitySlider;
  54.     
  55.                 if ($currentTool == "wtPaint" 
  56.                     || $currentTool == "userPaint"
  57.                     || $currentTool == "attrPaint"
  58.                     || attrPaintInstCheckTool($currentTool)    ) 
  59.                 {
  60.                     text -l "";
  61.                     floatSliderGrp -field true -l "Value" -pre 3 
  62.                         -min 0.0 -max 1.0 -step 0.05 -cw3 72 55 140 
  63.                     colorSlider;
  64.                 }
  65.  
  66.                 // flood button
  67.                 button -w 55 -l "Flood" floodButton;
  68.             }
  69.         setParent ..;
  70.  
  71.         separator -h 5 -style "none";
  72.         rowColumnLayout -nc 9
  73.                  -cw 1 48 
  74.                  -cw 2 38 -cw 3 38 -cw 4 38 -cw 5 38 -cw 6 38 -cw 7 38
  75.                   -cw 8 38 -cw 9 38;
  76.             text -al "right" -l "Shape " text1;
  77.              symbolCheckBox -w 33 -h 36 -i "circlePoly.xpm"  bsCirclePoly;
  78.             symbolCheckBox -w 33 -h 36 -i "circleGaus.xpm"  bsCircleGaus;
  79.             symbolCheckBox -w 33 -h 36 -i "circleSolid.xpm" bsCircleSolid;
  80.             symbolCheckBox -w 33 -h 36 -i "semiCirclePoly.xpm" bsSemiCirclePoly;
  81.             symbolCheckBox -w 33 -h 36 -i "semiCircleSolid.xpm" bsSemiCircleSolid;
  82.             symbolCheckBox -w 33 -h 36 -i "rect.xpm"            bsRect;
  83.             symbolCheckBox -w 33 -h 36 -i "lineH.xpm"           bsLineH;
  84.             symbolCheckBox -w 33 -h 36 -i "lineV.xpm"           bsLineV;
  85.             separator -h 5 -style "none";
  86.         setParent ..;
  87.     setParent ..;
  88.     setParent ..;   // frameLayout
  89.  
  90. }
  91.  
  92.  
  93. global proc jasperValueProperties( 
  94.     string $jasperMode, 
  95.     string $currentTab,
  96.     string $currentTool,
  97.     int    $extendUI,
  98.     string $extendUIProperties
  99. )
  100. {
  101.     global float    $jasperBigFloat;
  102.  
  103.     setParent $currentTab;
  104.  
  105.     columnLayout -width 365 -cat "both" 1 -adj true;
  106.     rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  107.     
  108.     separator -h 10 -style "none";
  109.     separator -h 10 -style "none";
  110.     separator -h 10 -style "none";
  111.                 
  112.     //
  113.     // Stamp Profile frameLayout
  114.     //
  115.     jasperStampProfileProperties( $jasperMode, $currentTool );
  116.  
  117.     separator -h 10 -style "none";
  118.     separator -h 10 -style "none";
  119.     separator -h 10 -style "none";
  120.  
  121.  
  122.     //
  123.     // Operation frameLayout
  124.     //
  125.        frameLayout -l "Operation" -la "center" -li 5 
  126.             -bs "etchedIn" -collapse false -collapsable false valueOperation;
  127.         columnLayout;               
  128.         separator -h 3 -style "none";
  129.         radioButtonGrp -l "" -nrb 4 -cw5 5 90 60 70 70
  130.             -l1 "Replace" -l2 "Add" -l3 "Scale" -l4 "Smooth"
  131.         op0Radio;
  132.         separator -h 3 -style "none";
  133.     setParent ..;
  134.     setParent ..;  
  135.  
  136.     separator -h 10 -style "none";
  137.      separator -h 10 -style "none";
  138.     separator -h 10 -style "none";
  139.   
  140.  
  141.     if( $extendUI )
  142.     {
  143.         string $cmd = $extendUIProperties + " "
  144.             + $jasperMode + " "
  145.             + $currentTab + " "
  146.             + $currentTool;
  147.         eval $cmd;
  148.  
  149.         separator -h 10 -style "none";
  150.         separator -h 10 -style "none";
  151.         separator -h 10 -style "none";
  152.     }
  153.  
  154.     //
  155.     //    Value Range frameLayout
  156.     //
  157.        frameLayout -l "Value Range" -la "center" -li 5 
  158.         -bs "etchedIn" -collapse false -collapsable false valueRange;
  159.     columnLayout;               
  160.         separator -h 3 -style "none";
  161.         floatSliderGrp -field true -l "Paint Offset" -cal 1 "right"
  162.             -pre 2 -cw3 115 55 140
  163.             -min -5.0 -max 5.0
  164.             -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  165.             ptOffset;    
  166.  
  167.         separator -h 3 -style "none";
  168.         floatSliderGrp -field true -l "Paint Mult" -cal 1 "right"
  169.             -pre 2 -cw3 115 55 140
  170.             -min -5.0 -max 5.0
  171.             -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  172.             ptMult;   
  173.         separator -h 3 -style "none";
  174.     setParent ..;
  175.     setParent ..;
  176.  
  177.     separator -h 5 -style "none";
  178.      separator -h 5 -style "none";
  179.     separator -h 5 -style "none";
  180.  
  181.  
  182.     //
  183.     //    Clamping frameLayout 
  184.     //
  185.        frameLayout -l "Clamping" -la "center" -li 5 
  186.         -bs "etchedIn" -collapse false -collapsable false valueClamp;
  187.     columnLayout;               
  188.         separator -h 3 -style "none";
  189.         radioButtonGrp -l "" -nrb 4 -cw5 10 60 60 80 80 
  190.             -l1 "None" -l2 "Both" -l3 "Lower" -l4 "Upper"
  191.         clampRadio;
  192.  
  193.         separator -h 3 -style "none";
  194.  
  195.         floatSliderGrp -field true -l "Clamp Lower" -cal 1 "right"
  196.             -pre 2 -cw3 115 55 140
  197.             -min -5.0 -max 5.0
  198.             -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  199.             clLower;    
  200.  
  201.         separator -h 3 -style "none";
  202.  
  203.         floatSliderGrp -field true -l "Clamp Upper" -cal 1 "right"
  204.             -pre 2 -cw3 115 55 140
  205.             -min -5.0 -max 5.0
  206.             -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  207.             clUpper;  
  208.         separator -h 3 -style "none";
  209.     setParent ..;
  210.     setParent ..;
  211.  
  212.     if ( $currentTool == "wtPaint" ) {
  213.         separator -h 10 -style "none";
  214.          separator -h 10 -style "none";
  215.         separator -h 10 -style "none";
  216.  
  217.         frameLayout -l "Clusters or Jiggles" -la "center" -li 5 
  218.             -bs "etchedIn" -collapse false -collapsable false;
  219.         columnLayout;               
  220.             separator -h 5 -style "none";
  221.  
  222.             rowColumnLayout -nc 1 -cw 1 320 -co 1 left 60;
  223.                 text -label "Select Cluster or Jiggle To Modify";
  224.             setParent ..;
  225.  
  226.             rowColumnLayout -nc 1 -cw 1 320 -co 1 left 120;
  227.                 textScrollList -w 320 -h 50 -nr 5 -ams false weightScrollList;
  228.             setParent ..;
  229.  
  230.             separator -h 15 -style "none";
  231.         setParent ..;
  232.         setParent ..;  
  233.     }
  234.  
  235.     setParent ..;
  236.     setParent ..;
  237. }
  238.  
  239.  
  240. proc jasperStrokeProperties( 
  241.     string $currentTab,
  242.     string $currentTool
  243. )
  244. {
  245.     setParent $currentTab;
  246.  
  247.     columnLayout -cat "both" 1 -adj true;
  248.     rowColumnLayout -nc 2 -cw 1 1  -cw 2 360;
  249.     
  250.     separator -h 20 -style "none";
  251.     separator -h 20 -style "none";
  252.     separator -h 20 -style "none";
  253.  
  254.     //
  255.     //    Reflect Paint frameLayout
  256.     //
  257.     frameLayout -l "Reflect Paint" -la "center" -li 5 
  258.             -bs "etchedIn" -collapse false -collapsable false reflectionFrameL;
  259.     columnLayout;
  260.     separator -h 5 -style "none";
  261.         checkBoxGrp -ncb 1 -cw2 113 250 -l "Reflection" 
  262.             -l1 "On/Off" reflectStrokeChkBox;
  263.  
  264.         separator -h 5 -style "none";
  265.         rowColumnLayout -nc 3 -cw 1 104 -cw 2 186 -cw 3 45; 
  266.             columnLayout;
  267.                 radioButtonGrp -l "" -nrb 1 -cw2 6 98
  268.                            -l1 "U Dir"    refPaint0Radio;
  269.                 radioButtonGrp -l "     "  -scl refPaint0Radio 
  270.                     -nrb 1 -cw2 6 98 -l1 "V Dir" refPaint1Radio;
  271.                 if ( $currentTool != "paintColor" ) {
  272.                     radioButtonGrp -l " " -scl refPaint0Radio 
  273.                         -nrb 1 -cw2 6 98 -l1 "Multiple Surf" refPaint2Radio;
  274.                 }
  275.             setParent ..;
  276.  
  277.             columnLayout;
  278.                 floatSliderGrp -field true -l "" -cw3 1 45 125 
  279.                     -columnAttach3 "both" "both" "both"
  280.                     -min 0.0 -max 1.0 -ss 0.05 -v 0.5 
  281.                     singleUSlider; 
  282.  
  283.                 floatSliderGrp -field true -l "" -cw3 1 45 125 
  284.                     -columnAttach3 "both" "both" "both"
  285.                     -min 0.0 -max 1.0 -v 0.5 -ss 0.05 
  286.                     singleVSlider;
  287.             setParent ..;
  288.  
  289.             columnLayout -adjustableColumn true;
  290.                 button -w 45 -l "Reset" reflectUButton;
  291.                 button -w 45 -l "Reset" reflectVButton;
  292.             setParent ..;
  293.         setParent ..;
  294.  
  295.         // display the reference vector checkbox only for putty context
  296.         if ( $currentTool == "putty" ) {
  297.             rowColumnLayout -nc 2 -cw 1 170 -cw 2 100; 
  298.                 text -al "right" -l "Invert Reference Vector  ";
  299.                 checkBoxGrp -ncb 1 -cw2 170 100 -l1 "On/Off" invertVectorChkBox;
  300.             setParent ..;
  301.         }
  302.         separator -h 5 -style "none";
  303.     setParent ..;
  304.     setParent ..;
  305.  
  306.     separator -h 20 -style "none";
  307.     separator -h 20 -style "none";
  308.     separator -h 20 -style "none";
  309.  
  310.     // 
  311.     //    Stylus Pressure frameLayout
  312.     //
  313.        frameLayout -l "Stylus Pressure"  -la "center" -li 5
  314.                 -bs "etchedIn" -collapse false -collapsable false;
  315.     columnLayout;
  316.         radioButtonGrp -l "" -nrb 4 -cw5 10 80 80 80 70
  317.             -l1 "None" -l2 "Opacity" -l3 "Radius" -l4 "Both"
  318.         pressure0Radio;
  319.     setParent ..;
  320.     setParent ..;
  321.  
  322.     separator -h 20 -style "none";
  323.     separator -h 20 -style "none";
  324.     separator -h 20 -style "none";
  325.  
  326.     //
  327.     //  Profile Alignment frameLayout
  328.     //
  329.        frameLayout -l "Profile Alignment" -la "center" -li 5
  330.                 -bs "etchedIn" -collapse false -collapsable false;
  331.     columnLayout;
  332.         radioButtonGrp -nrb 2 -l "" -cw3 15 190 100
  333.             -l1 "U Tangent" -l2 "V Tangent"
  334.         compRef0Radio;
  335.         radioButtonGrp -l "" -scl compRef0Radio -nrb 2 -cw3 15 190 110
  336.             -l1 "Up Vector" -l2 "Path Direction"
  337.         compRef1Radio;
  338.     setParent ..;
  339.     setParent ..;
  340.  
  341.     setParent ..;
  342.     setParent ..;
  343. }
  344.  
  345.  
  346. proc jasperSeamCommCornerProperties( )
  347. {
  348.     columnLayout;
  349.         separator -h 7 -style "none";
  350.         rowColumnLayout -nc 4 -cw 1 110 -cw 2 5 -cw 3 5 -cw 4 220;
  351.  
  352.         columnLayout;
  353.             radioButtonGrp -l "Display" -nrb 1 -cw2 62 48
  354.                 -cal 1 "right" -cal 2 "left"
  355.                 -l1 "Off" commCornerDisplay0;
  356.             radioButtonGrp -l "" -scl commCornerDisplay0 -nrb 1 -cw2 62 48
  357.                 -cal 1 "right" -cal 2 "left"
  358.                 -l1 "On" commCornerDisplay1;
  359.         setParent ..;
  360.  
  361.         separator -hr false -h 90;
  362.         separator -h 3 -style "none";
  363.  
  364.         columnLayout;
  365.             separator -h 12 -style "none";
  366.             separator -h 12 -style "none";
  367.             separator -h 12 -style "none";
  368.             separator -h 12 -style "none";
  369.             separator -h 12 -style "none";
  370.         setParent ..;
  371.     setParent ..; 
  372.     setParent ..;
  373. }
  374.  
  375.  
  376. proc jasperSeamCommEdgeProperties( )
  377. {
  378.     columnLayout;
  379.         separator -h 7 -style "none";
  380.         rowColumnLayout -nc 4 -cw 1 110 -cw 2 5 -cw 3 5 -cw 4 220;
  381.             columnLayout;
  382.                 radioButtonGrp -l "Display" -nrb 1 -cw2 62 48
  383.                     -cal 1 "right" -cal 2 "left"
  384.                         -l1 "Off" commEdgesDisplay0;
  385.                 radioButtonGrp -l "" -scl commEdgesDisplay0 -nrb 1 -cw2 62 48
  386.                     -cal 1 "right" -cal 2 "left"
  387.                         -l1 "One" commEdgesDisplay1;
  388.                 radioButtonGrp -l "" -scl commEdgesDisplay0 -nrb 1 -cw2 62 48
  389.                     -cal 1 "right" -cal 2 "left"
  390.                         -l1 "All" commEdgesDisplay2;
  391.             setParent ..;
  392.  
  393.             separator -hr false -h 90;
  394.             separator -h 3 -style "none";
  395.  
  396.             columnLayout;
  397.                 separator -h 3 -style "none";
  398.                 rowColumnLayout -nc 2 -cw 1 130 -cw 2 90;
  399.                     text -w 128 -h 15 -al "left" -l "From Surface" commEdge1Text;
  400.                     text -w 80 -h 15  -al "left" -l "Edge" commEdge2Text;
  401.                     textFieldGrp -ed false -cw2 1 128 
  402.                         -label "" commEdgeRefPainterName;
  403.                     textFieldGrp -ed false -cw2 1 65 
  404.                         -label "" commEdgeRefPainterEdge;
  405.     
  406.                     separator -h 3 -style "none";
  407.                     separator -h 3 -style "none";
  408.     
  409.                     text -w 128 -h 15 -al "left" -l "To Surface" commEdge3Text;
  410.                     text -w 80 -h 15  -al "left" -l "Edge" commEdge4Text;
  411.                     textFieldGrp -ed false -cw2 1 128 
  412.                         -label "" commEdgeTarPainterName;
  413.                     textFieldGrp -ed false -cw2 1 65 
  414.                         -label "" commEdgeTarPainterEdge;
  415.                 setParent ..;
  416.     
  417.                 separator -h 5 -style "none";
  418.  
  419.                 rowColumnLayout -nc 4 -cw 1 40 -cw 2 80 -cw 3 80 ;
  420.                     separator -h 8 -style "none";
  421.                     button -l "Prev" commEdgeDisplayOnePrev;
  422.                     button -l "Next" commEdgeDisplayOneNext;
  423.                 setParent ..;
  424.             setParent ..;
  425.             separator -h 3 -style "none";
  426.         setParent ..;
  427.  
  428.         separator -h 3 -style "none";
  429.  
  430.     setParent ..;
  431. }
  432.  
  433.  
  434. proc jasperSeamProperties( 
  435.     string $currentTab,
  436.     string $currentTool
  437. )
  438. {
  439.     setParent $currentTab;
  440.  
  441.     columnLayout -cat "both" 1 -adj true;
  442.     rowColumnLayout -nc 2 -cw 1 1  -cw 2 350;
  443.  
  444.     separator -h 20 -style "none";
  445.     separator -h 20 -style "none";
  446.     separator -h 20 -style "none";
  447.  
  448.     //
  449.     //    Brush Mode frameLayout
  450.     //
  451.     if ( $currentTool == "putty" || $currentTool == "wtPaint" 
  452.          || $currentTool == "userPaint" || $currentTool == "attrPaint" 
  453.          || attrPaintInstCheckTool($currentTool) ) 
  454.     {
  455.         frameLayout -l "Brush Mode" -la "center" -li 5
  456.                 -bs "etchedIn" -collapse false -collapsable false brushModeLayout;
  457.         columnLayout;
  458.  
  459.             radioButtonGrp -l "" -nrb 3 -cw4 10 115 105 120
  460.                 -l1 "Paint Surfaces" -l2 "Select Edges" -l3 "Select Corners"
  461.                 -columnAttach4 both both both both 
  462.                 brushOperationType;
  463.         setParent ..;
  464.         setParent ..;
  465.  
  466.         separator -h 12 -style "none";
  467.         separator -h 12 -style "none";
  468.         separator -h 12 -style "none";
  469.     }
  470.  
  471.  
  472.     //
  473.     //    Seam AutoCreation frameLayout
  474.     //
  475.      frameLayout -l "Seam Auto-creation" -la "center" -li 5 
  476.                 -bs "etchedIn" -collapse false -collapsable false seamAutoLayout;
  477.     columnLayout;
  478.  
  479.         if(  $currentTool == "putty" || $currentTool == "wtPaint" 
  480.              || $currentTool == "userPaint" || $currentTool == "attrPaint" 
  481.              || attrPaintInstCheckTool($currentTool) )
  482.         { 
  483.             separator -h 7 -style "none";
  484.             text -w 100 -al "left" -l "Multi Surfaces:";
  485.             rowColumnLayout -nc 2 -cw 1 320 -cw 2 30;
  486.  
  487.                 floatSliderGrp -field true -cw3 120 60 140 -l "Seam Tolerance"
  488.                     -columnAttach3 "both" "both" "both"
  489.                     -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
  490.                     commEdgesTol;
  491.                 text -al "left" -l "" commEdgesTolUnits;
  492.  
  493.                 floatSliderGrp -field true -cw3 120 60 140 -l "Min. Length"
  494.                     -columnAttach3 "both" "both" "both"
  495.                     -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
  496.                     commEdgesMinLength;
  497.                 text -al "left" -l "" commEdgesMinLengthUnits;
  498.             setParent ..;
  499.         }
  500.  
  501.         separator -h 8 -style "none";
  502.         text -w 100 -al "left" -l "Single Surface:";
  503.         rowColumnLayout -nc 2 -cw 1 320 -cw 2 30;
  504.             floatSliderGrp -field true -cw3 120 60 140 -l "Seam & Pole Tol."
  505.                     -columnAttach3 "both" "both" "both"
  506.                  -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
  507.                  collapseCVTol;
  508.             text -al "left" -l "" collapseCVTolUnits;
  509.  
  510.             separator -h 10 -style "none";
  511.         setParent ..; 
  512.  
  513.     setParent ..;
  514.     setParent ..;
  515.  
  516.     separator -h 15 -style "none";
  517.     separator -h 15 -style "none";
  518.     separator -h 15 -style "none";
  519.  
  520.     //
  521.     //    Common Edge/Corner frameLayout
  522.     //
  523.     if ( $currentTool == "putty" || $currentTool == "wtPaint" 
  524.          || $currentTool == "userPaint" || $currentTool == "attrPaint" 
  525.          || attrPaintInstCheckTool($currentTool) ) 
  526.     {
  527.         frameLayout -lv false -la "center" -li 5 
  528.                 -bv false -collapse false -collapsable false commEdgeCornerLayout;
  529.              rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  530.              separator -h 18 -style "none";
  531.     
  532.              string $tabs = `tabLayout`;
  533.              frameLayout -bs "etchedIn" -lv false CommEdge;
  534.                  jasperSeamCommEdgeProperties;    
  535.              setParent ..;
  536.              frameLayout -bs "etchedIn" -lv false CommCorner;
  537.                  jasperSeamCommCornerProperties;
  538.              setParent ..;
  539.  
  540.              tabLayout -edit -tabLabel CommEdge "Common Edge" 
  541.                  -tabLabel CommCorner "Common Corner"
  542.                  $tabs;
  543.              setParent ..;
  544.              setParent ..;
  545.          setParent ..;
  546.     }
  547.  
  548.     //
  549.     //    Stitching Mode frameLayout
  550.     //        - this is only displayed in the puttyContext
  551.     //
  552.     if ( $currentTool == "putty" ) {
  553.         separator -h 10 -style "none";
  554.         separator -h 10 -style "none";
  555.         separator -h 10 -style "none";
  556.  
  557.         frameLayout -l "Stitching Mode" -la "center" -li 5 
  558.                 -bs "etchedIn" -collapse false -collapsable false puttyStitchLayout;
  559.         columnLayout;
  560.             if(!`about -mac`)
  561.             separator -h 3 -style "none";
  562.             radioButtonGrp -l "Edges" -nrb 3 -cw4 70 55 80 80
  563.                 -l1 "Off" -l2 "Position" -l3 "Tangent" stitchTypeRadio;
  564.  
  565.             rowColumnLayout -nc 2 -cw 1 170 -cw 2 95; 
  566.             columnLayout;
  567.                 checkBoxGrp -l "Corners" -ncb 1 -cw2 90 80 
  568.                         -l1 "On/Off" stitchCornerChkBox;
  569.                 checkBoxGrp -l "Pole CVs" -ncb 1 -cw2 90 80 
  570.                         -l1 "On/Off" stitchPoleCVChkBox;
  571.             setParent ..;
  572.  
  573.             columnLayout;
  574.                 separator -h 15 -style "none";
  575.                 button -l "  Stitch Now  " -h 27 -w 90 stitchNowButton;
  576.             setParent ..;
  577.  
  578.             setParent ..;
  579.             separator -h 5 -style "none";
  580.         setParent ..;
  581.         setParent ..;
  582.     }
  583.     //
  584.     // Common Edge Value Averaging
  585.     // - this is only displayed if we are in wtPaint or userPaint
  586.     //
  587.     else if ( $currentTool == "wtPaint" || $currentTool == "userPaint" 
  588.               || $currentTool == "attrPaint" 
  589.               || attrPaintInstCheckTool($currentTool) )
  590.     {
  591.         separator -h 20 -style "none";
  592.         separator -h 20 -style "none";
  593.         separator -h 20 -style "none";
  594.  
  595.         frameLayout -l "Common Edge Value Averaging" -la "center" -li 5 
  596.                 -bs "etchedIn" -collapse false -collapsable false valueStitchLayout;
  597.         columnLayout -adj true;
  598.             separator -h 5 -style "none";
  599.             checkBoxGrp -l "Averaging Seam" -ncb 1 -cw2 150 100 
  600.                     -l1 "On/Off" averageEdgeValues;
  601.             checkBoxGrp -l "Averaging Pole CVs" -ncb 1 -cw2 150 100 
  602.                     -l1 "On/Off" averagePoleCVValues;
  603.         setParent ..;
  604.         setParent ..;
  605.     }
  606.  
  607.     setParent ..;
  608.     setParent ..;
  609. }
  610.  
  611.  
  612.  
  613. proc jasperMaskProperties( 
  614.     string $currentTab
  615. )
  616. {
  617.     setParent $currentTab;
  618.  
  619.     columnLayout -cat "both" 1 -adj true;
  620.     rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  621.  
  622.     separator -h 20 -style "none";
  623.     separator -h 20 -style "none";
  624.     separator -h 20 -style "none";
  625.  
  626.     //
  627.     //    Vert Mask frameLayout
  628.     //
  629.     frameLayout -l "Masking" -la "center" -li 5 
  630.                 -bs "etchedIn" -collapse false -collapsable false;
  631.     columnLayout;
  632.         separator -h 10 -style "none";
  633.         radioButtonGrp -l "" -nrb 3  -cw4 5 52 130 138 
  634.             -l1 "Off" -l2 "Selected Vertices" -l3 "Unselected Vertices"
  635.         cvMaskType;
  636.  
  637.         separator -h 10 -style "none";
  638.         checkBoxGrp -ncb 1 -cw2 125 220 -l "Display Vertices"
  639.             -l1 "(only in object mode)" -cal 1 "right" cvMaskDisplay;
  640.         separator -h 10 -style "none";
  641.     setParent ..;
  642.     setParent ..;
  643.  
  644.     setParent ..;
  645.     setParent ..;
  646.     setParent ..;
  647. }
  648.  
  649.  
  650. proc jasperMapProperties( 
  651.     string $currentTab,
  652.     string $currentTool 
  653. )
  654. {
  655.     setParent $currentTab;
  656.  
  657.     columnLayout -width 365 -cat "both" 1 -adj true;
  658.     rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  659.     
  660.     separator -h 20 -style "none";
  661.      separator -h 20 -style "none";
  662.     separator -h 20 -style "none";
  663.  
  664.     //
  665.     //    Import Map frameLayout
  666.     //
  667.        frameLayout -l "Import Attribute Map" -la "center" -li 5 
  668.                 -bs "etchedIn" -collapse false -collapsable false;
  669.     columnLayout;
  670.         separator -h 5 -style "none";
  671.         text -al "right" -l "   Map Name:";
  672.         separator -h 10 -style "none";
  673.  
  674.         rowColumnLayout -nc 3 -cs 1 5 -cw 1 180 
  675.                 -cs 2 5 -cw 2 60 -cs 3 5 -cw 3 60; 
  676.             textFieldGrp -cw 1 180 importMapNameField;
  677.             button -l "Reload" importReloadButton;
  678.             button -l "Browse..." importMapButton;
  679.             separator -h 10 -style "none";
  680.         setParent ..;
  681.  
  682.         columnLayout -cat "left" 30;
  683.             checkBoxGrp -cw2 170 150 
  684.                 -l "Reassign Attribute Maps " -l1 " " 
  685.             reassignMapsChkBox;
  686.                 separator -h 10 -style "none";
  687.  
  688.             radioButtonGrp -l "Import Value " -nrb 2
  689.                 -cw3 100 100 100
  690.                 -la2 "Alpha" "Luminance"
  691.                 importMapAlphaValueRadio1;
  692.             radioButtonGrp -nrb 3
  693.                 -l ""
  694.                 -cw4 100 50 50 50
  695.                 -la3 "R" "G" "B"
  696.                 -scl "importMapAlphaValueRadio1"
  697.                 importMapAlphaValueRadio2;
  698.             if ( attrPaintInstCheckTool($currentTool) ) {
  699.                 string $name = eval("attrPaintCtx -q -bcn `currentCtx`");
  700.                 if ( $name == "polyClrVertPaint" ) {
  701.                     radioButtonGrp -nrb 2
  702.                         -l ""
  703.                         -cw3 100 100 100
  704.                         -la2 "RGB" "RGBA"
  705.                         -scl "importMapAlphaValueRadio1"
  706.                         importMapAlphaValueRadio3;
  707.                 }
  708.             }
  709.             separator -h 15 -style "none";
  710.         setParent ..;
  711.  
  712.         // display the treshhold for select context only
  713.         if ( $currentTool == "selectPaint" ) {
  714.             columnLayout -cat "left" 30;
  715.                 floatSliderGrp -field true -l "Threshold " 
  716.                     -cw3 80 60 100 -pre 3 
  717.                     -min 0.000 -max 1.0 -v 0.5 -step 0.05 
  718.                     importSelectCVThresholdSlider;
  719.                 separator -h 10 -style "none";
  720.             setParent ..;
  721.         }
  722.  
  723.     setParent ..;
  724.     setParent ..;
  725.  
  726.     separator -h 20 -style "none";
  727.      separator -h 20 -style "none";
  728.     separator -h 20 -style "none";
  729.  
  730.     //
  731.     //    Export Map frameLayout
  732.     //
  733.     if ( ( $currentTool == "wtPaint" )  || 
  734.          ( $currentTool == "userPaint") ||  
  735.          ( $currentTool == "attrPaint") ||
  736.          ( attrPaintInstCheckTool($currentTool) ) ||
  737.          ( $currentTool == "selectPaint") ) 
  738.     {
  739.            frameLayout -l "Export Attribute Map" -la "center" -li 5 
  740.                 -bs "etchedIn" -collapse false -collapsable false;
  741.         columnLayout;
  742.             separator -h 5 -style "none";
  743.             text -al "right" -l "   Map Name: ";
  744.             separator -h 5 -style "none";
  745.  
  746.             rowColumnLayout -nc 3 -cs 1 5 -cw 1 180 
  747.                 -cs 2 5 -cw 2 60 -cs 3 5 -cw 3 60; 
  748.                 textFieldGrp -cw 1 180 exportMapNameField;
  749.                 button -l "Resave" exportReloadButton;
  750.                 button -l "Browse..." exportMapButton;
  751.                     separator -h 5 -style "none";
  752.             setParent ..;
  753.  
  754.             // determine if this is 3d or 1d paint
  755.             //
  756.             string $name = "";
  757.             if ( attrPaintInstCheckTool($currentTool) ) {
  758.                 $name = eval("attrPaintCtx -q -bcn `currentCtx`");
  759.             }
  760.  
  761.             // if this is not 3d color paint tool (1d case)
  762.             // 
  763.             if ( $name != "polyClrVertPaint" ) {    
  764.                 columnLayout -cat "left" 30;
  765.                     separator -h 10 -style "none";
  766.                     radioButtonGrp -l "Export Value " -nrb 2
  767.                         -cw3 100 100 100 
  768.                         -la2 "Alpha" "Luminance"  
  769.                         exportMapValueRadio1;
  770.                     separator -h 10 -style "none";
  771.                 setParent ..;
  772.             } else {        // paint color per vertex - 3d case
  773.                 columnLayout -cat "left" 30;
  774.                     separator -h 10 -style "none";
  775.                     radioButtonGrp -l "Export Value " -nrb 3
  776.                         -cw4 100 80 80 80 
  777.                         -la3 "Alpha"  "RGB"  "RGBA"
  778.                         exportMapValueRadio2;
  779.                     separator -h 10 -style "none";
  780.                 setParent ..;
  781.             }
  782.  
  783.             columnLayout -cat "left" 30;
  784.                 intSliderGrp -field true -l "Map Size X" -cw3 85 60 100
  785.                     -min 1 -max 8192 -v 256 -ss 256 
  786.                     exportMapSizeXSlider;
  787.                     separator -h 5 -style "none";
  788.  
  789.                 intSliderGrp -field true -l "Map Size Y" 
  790.                     -cw3 85 60 100
  791.                     -min 1 -max 8192 -v 256 -ss 256 
  792.                     exportMapSizeYSlider;
  793.                     separator -h 5 -style "none";
  794.  
  795.                 checkBoxGrp -cw2 150 150 
  796.                     -l "Keep Aspect Ratio " -l1 " " 
  797.                     exportKeepAspectChkBox;
  798.                     separator -h 10 -style "none";
  799.  
  800.                 rowLayout -nc 2;
  801.                     optionMenuGrp -l "Image Format" 
  802.                     -cw 1 95 imageFormatOptionMenu;
  803.                         if (`about -mac` ){
  804.                             menuItem -l "TIFF"                 fileFormatMenuItem0;
  805.                             menuItem -l "SGI"                   fileFormatMenuItem1;
  806.                             menuItem -l "Maya IFF"             fileFormatMenuItem2;
  807.                             menuItem -l "JPEG"              fileFormatMenuItem3;
  808.                             menuItem -l "Targa"               fileFormatMenuItem4;
  809.                             menuItem -l "WindowsBitmap"     fileFormatMenuItem5;
  810.                             menuItem -l "QuickTime Image"    fileFormatMenuItem6;
  811.                             menuItem -l "QuickDraw"           fileFormatMenuItem7;
  812.                             menuItem -l "Photoshop"           fileFormatMenuItem8;
  813.                                menuItem -l "PNG"                   fileFormatMenuItem9;
  814.                                menuItem -l "MacPaint"               fileFormatMenuItem10;
  815.                         } else {
  816.                             menuItem -l "GIF"            fileFormatMenuItem0;
  817.                             menuItem -l "SoftImage"     fileFormatMenuItem1;
  818.                             menuItem -l "RLA"             fileFormatMenuItem2;
  819.                             menuItem -l "TIFF"             fileFormatMenuItem3;
  820.                             menuItem -l "SGI"             fileFormatMenuItem4;
  821.                             menuItem -l "Alias PIX"     fileFormatMenuItem5;
  822.                             menuItem -l "Maya IFF"      fileFormatMenuItem6;
  823.                             menuItem -l "JPEG"             fileFormatMenuItem7;
  824.                             menuItem -l "EPS"             fileFormatMenuItem8;
  825.                             menuItem -l "Quantel"       fileFormatMenuItem9;
  826.                         }
  827.                 setParent ..;
  828.                     separator -h 10 -style "none";
  829.             setParent ..;
  830.         setParent ..;
  831.         setParent ..;
  832.     }
  833.     setParent ..;
  834.     setParent ..;
  835.     setParent ..;
  836. }
  837.  
  838.  
  839.  
  840. proc jasperDisplayProperties( 
  841.     string $currentTab, 
  842.     string $currentTool
  843. )
  844. {
  845.     global float    $jasperBigFloat;
  846.  
  847.     setParent     $currentTab;
  848.  
  849.     columnLayout -width 365 -cat "both" 1 -adj true;
  850.     rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  851.                     
  852.     separator -h 20 -style "none";
  853.      separator -h 20 -style "none";
  854.     separator -h 20 -style "none";
  855.     
  856.     //
  857.     // Surface frameLayout
  858.     //
  859.     frameLayout -l "Surface" -la "center" -li 5 
  860.                 -bs "etchedIn" -collapse false -collapsable false;
  861.     columnLayout;                    
  862.         separator -h 10 -style "none";
  863.         checkBoxGrp -cw2 113 200 -ncb 1 -l " " 
  864.             -l1 "Draw Outline" drawOutlineChkBox;
  865.         checkBoxGrp -cw2 140 200 -ncb 1 -l " " 
  866.             -l1 "Draw Brush Feedback" brushFeedbackChkBox;
  867.         checkBoxGrp -cw2 140 200 -ncb 1 -l " " 
  868.             -l1 "Draw Outline While Painting" drawOutlinePaintingChkBox;
  869.         checkBoxGrp -cw2 113 200 -ncb 1 -l " " 
  870.             -l1 "Show Wireframe" showActiveLinesChkBox;
  871.         separator -h 10 -style "none";
  872.     setParent ..;
  873.     setParent ..;
  874.  
  875.     separator -h 20 -style "none";
  876.      separator -h 20 -style "none";
  877.     separator -h 20 -style "none";
  878.  
  879.     //    Color feedback frameLayout
  880.     //        - this is only displayed for wtPaint and userPaint tools
  881.     //
  882.     if (  ($currentTool == "userPaint")
  883.         ||( attrPaintInstCheckTool($currentTool) ) )
  884.     {
  885.         frameLayout -l "Values" -la "center" -li 5 
  886.             -bs "etchedIn" -collapse false -collapsable false jasperDisplayValue;
  887.             columnLayout;                    
  888.                 checkBoxGrp -cw2 95 200 -ncb 1 -l "" 
  889.                     -l1 "Color Feedback" colorFeedbackChkBox;
  890.                 checkBoxGrp -cw2 95 200 -ncb 1 -l "" 
  891.                     -l1 "Disable Lighting" disableLightingChkBox;
  892.                 if ( $currentTool == "wtPaint" ) {
  893.                     checkBoxGrp -cw2 95 200 -ncb 1 -l "" 
  894.                         -l1 "Use Set Color" useSetColorChkBox;
  895.                 }
  896.                 separator -h 5 -style "none";
  897.         
  898.                 if ( $currentTab == "Display" && $currentTool == "clothPaint" ) {
  899.                     floatSliderGrp -field true -l "Min Color @" -cal 1 "right"
  900.                         -pre 2 -cw3 95 50 140
  901.                         -min -100.0 -max 100.0
  902.                         -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  903.                         crLower;    
  904.                     floatSliderGrp -field true -l "Max Color @" -cal 1 "right"
  905.                         -pre 2 -cw3 95 50 140
  906.                         -min -100.0 -max 100.0
  907.                         -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  908.                         crUpper;  
  909.                 }
  910.                 else {
  911.                     floatSliderGrp -field true -l "Min Color @" -cal 1 "right"
  912.                         -pre 2 -cw3 95 50 140
  913.                         -min -5.0 -max 5.0
  914.                         -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  915.                         crLower;    
  916.                     floatSliderGrp -field true -l "Max Color @" -cal 1 "right"
  917.                         -pre 2 -cw3 95 50 140
  918.                         -min -5.0 -max 5.0
  919.                         -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
  920.                         crUpper;
  921.                 }
  922.  
  923.                 separator -h 5 -style "none";
  924.             setParent ..;
  925.         setParent ..;
  926.     }
  927.  
  928.     if ( $currentTool == "setEditPaint" ) {
  929.         frameLayout -l "Values" -la "center" -li 5 
  930.                     -bs "etchedIn" -collapse false -collapsable false;
  931.         columnLayout;                    
  932.                checkBoxGrp -ncb 1 -cw2 200 100 -l "Color Feedback " 
  933.                    -l1 "On/Off" setEditColorFeedbackChkBox;
  934.                checkBoxGrp -ncb 1 -cw2 200 100 -l "Display Active Vertices " 
  935.                 -l1 "On/Off" setEditDisplayCVsChkBox;
  936.  
  937.             separator -h 15 -style "none";
  938.         setParent ..;
  939.         setParent ..;
  940.     }
  941.  
  942.     setParent ..;
  943.     setParent ..;
  944.  
  945.     setParent ..;
  946. }
  947.  
  948.  
  949. proc jasperMiscProperties( 
  950.     string     $currentTab, 
  951.     string     $jasperCommand
  952. )
  953. {
  954.     setParent $currentTab;
  955.  
  956.     columnLayout -width 365 -cat "both" 1 -adj true;
  957.      rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
  958.  
  959.     separator -h 10 -style "none";
  960.     separator -h 10 -style "none";
  961.     separator -h 10 -style "none";
  962.  
  963.     //
  964.     //    Multiple Surface Detection frameLayout
  965.     //
  966.     frameLayout -l "Multiple Surface Detection" -la "center" -li 5 
  967.                 -bs "etchedIn" -collapse false -collapsable false;
  968.     columnLayout;
  969.         separator -h 8 -style "none";
  970.         text -al "right" -l "   Number of Surfaces:";
  971.  
  972.         rowColumnLayout -nc 2 -cw 1 140 -cw 2 260; 
  973.             columnLayout;
  974.                 radioButtonGrp -l " " -nrb 2 -cw3 8 71 80
  975.                          -l1 "Infinite"    -l2 "Finite" 
  976.                 multiSurfaceRadio;
  977.             setParent ..;
  978.  
  979.             columnLayout;
  980.                 intSliderGrp -field true -l ""   
  981.                     -columnAttach3 "both" "both" "both"
  982.                     -min 1 -max 15 -v 1 -cw3 1 35 160 
  983.                 multiSurfaceSizeSlider; 
  984.             setParent..;
  985.  
  986.         text -al "center" -l "     Use Common Edge Info     ";
  987.         checkBoxGrp -ncb 1 -cw2 80 200 -l1 "On/Off" multiSurfaceModeChkBox;
  988.         setParent ..;
  989.     separator -h 8 -style "none";
  990.  
  991.     setParent ..;
  992.     setParent ..;
  993.     setParent ..;
  994.  
  995.     separator -h 5 -style "none";
  996.  
  997.     //
  998.     //    Stamp Compensation frameLayout
  999.     //
  1000.     frameLayout -l "Stamp Compensation" -la "center" -li 5 
  1001.                 -bs "etchedIn" -collapse false -collapsable false;
  1002.     columnLayout;
  1003.         rowColumnLayout -nc 2 -cw 1 145 -cw 2 240;
  1004.             columnLayout;
  1005.                 radioButtonGrp -l "Comp. Mode" -nrb 1 -cw2 85 60 
  1006.                     -l1 "None"    comp0Radio;
  1007.                 radioButtonGrp -l "" -scl comp0Radio -nrb 1 -cw2 85 60
  1008.                     -l1 "Linear" comp1Radio;
  1009.                 radioButtonGrp -l "" -scl comp0Radio -nrb 1 -cw2 85 60
  1010.                        -l1 "Grid" comp2Radio;
  1011.             setParent ..;
  1012.  
  1013.             columnLayout;
  1014.                 text -l " ";
  1015.                 text -l " ";
  1016.                 intSliderGrp -field true -l "" -min 1 -max 10 
  1017.                     -cw3 1 35 80 compGridRadius;
  1018.             setParent ..;
  1019.         setParent ..;
  1020.         separator -h 10 -style "none";
  1021.     setParent ..;
  1022.     setParent ..;
  1023.  
  1024.     separator -h 5 -style "none";
  1025.  
  1026.     //
  1027.     //    Projective Paint frameLayout
  1028.     //
  1029.     frameLayout -l "Paint Mode" -la "center" -li 5 
  1030.                 -bs "etchedIn" -collapse false -collapsable false;
  1031.     columnLayout;
  1032.         rowColumnLayout -nc 1 -cw 1 450;
  1033.         columnLayout;
  1034.             radioButtonGrp -l " " -nrb 1 -cw2 85 280 
  1035.                    -l1 "Projective Paint (Polygons Only)"  paintType0Radio;
  1036.             radioButtonGrp -l " " -scl paintType0Radio -nrb 1 -cw2 85 300
  1037.                 -l1 "UV Texture Paint (NURBS or Polygons)" paintType1Radio;
  1038.         setParent ..;
  1039.     setParent ..;
  1040.     setParent ..;
  1041.     setParent ..;
  1042.                            
  1043.     separator -h 5 -style "none";
  1044.  
  1045.     //
  1046.     // Stroke Smoothing frameLayout
  1047.     //
  1048.     frameLayout -l "Stroke Smoothing" -la "center" -li 5 
  1049.         -bs "etchedIn" -collapse false -collapsable false;
  1050.     columnLayout;
  1051.         separator -h 5 -style "none";
  1052.         checkBoxGrp -ncb 1 -cw2 120 80 -l "Texture Space" 
  1053.             -l1 "On/Off" texSmoothChkBox;
  1054.         checkBoxGrp -ncb 1 -cw2 120 80 -l "Screen Space" 
  1055.             -l1 "On/Off" screenSmoothChkBox;
  1056.         intSliderGrp -field true -cw3 120 50 170 -l "Divisions" 
  1057.             -cal 1 "right" -min 1 -max 10 divisionSlider;
  1058.         separator -h 5 -style "none";
  1059.     setParent ..;
  1060.     setParent ..;
  1061.  
  1062.     separator -h 5 -style "none";
  1063.  
  1064.     //
  1065.     // Pre and Post stroke command frameLayout
  1066.     //
  1067.     frameLayout -l "MEL Stroke Callbacks" -la "center" -li 5 
  1068.         -bs "etchedIn" -collapse false -collapsable false;
  1069.     columnLayout;
  1070.         textFieldGrp -label "Before Stroke Cmd" -cw2 130 210 preStrokeTextField; 
  1071.         textFieldGrp -label "After Stroke Cmd" -cw2 130 210 postStrokeTextField;
  1072.         separator -h 5 -style "none";
  1073.     setParent ..;
  1074.     setParent ..;
  1075.         
  1076.     setParent ..;
  1077.     setParent ..;
  1078. }
  1079.  
  1080.  
  1081. global proc loadJasperTabUI( 
  1082.     string $jasperMode, 
  1083.     string $parent,
  1084.      string $jasperCommand, 
  1085.     string $cbParent, 
  1086.     string $colorSliderCB 
  1087. )
  1088. {
  1089.     string $currentTab = `tabLayout -query -selectTab $parent`;
  1090.     int    $childCount = `frameLayout -query -nch $currentTab`;
  1091.  
  1092.     string $currentContext  = `currentCtx`;
  1093.     string $currentTool     = `contextInfo -c $currentContext`;
  1094.  
  1095.     setParent $parent;
  1096.  
  1097.     if( 0 == $childCount)
  1098.     {
  1099.         waitCursor -state on;
  1100.  
  1101.         // Sculpt tools (nurbs and polys)
  1102.         if( $currentTab == "Sculpt" ) {
  1103.             jasperSculptProperties( 
  1104.                 $jasperMode, $currentTab, $currentTool, $jasperCommand 
  1105.             );
  1106.         } 
  1107.         // script paint and attribute paint tools
  1108.         else if( $currentTab == "Script_Paint" ) {
  1109.             jasperValueProperties( 
  1110.                 $jasperMode, $currentTab, $currentTool, false, "" 
  1111.             );
  1112.         } 
  1113.         // set membership tool
  1114.         else if( $currentTab == "SetMembership" ) {
  1115.             jasperSetEditProperties( $jasperMode, $currentTab, $currentTool );
  1116.         } 
  1117.         else if( $currentTab == "Stroke" ) {
  1118.             jasperStrokeProperties( $currentTab, $currentTool );
  1119.         } 
  1120.         else if( $currentTab == "Seam" ) {
  1121.             jasperSeamProperties( $currentTab, $currentTool );
  1122.             updateSeamProperties( $jasperCommand );
  1123.         } 
  1124.         else if( $currentTab == "Mask" ) {
  1125.             jasperMaskProperties( $currentTab );
  1126.         } 
  1127.         else if( $currentTab == "Map" ) {
  1128.             jasperMapProperties( $currentTab, $currentTool );
  1129.         } 
  1130.         else if( $currentTab == "Display" ) {
  1131.             jasperDisplayProperties( $currentTab, $currentTool );
  1132.         } 
  1133.         else if( $currentTab == "Misc" ) {
  1134.             jasperMiscProperties( $currentTab, $jasperCommand );
  1135.         } 
  1136.         else if( $currentTab == "Setup" ) {
  1137.             jasperSetupProperties( $jasperMode, $currentTab );
  1138.         } 
  1139.         else {
  1140.             attrPaintInstPropertiesDefine( $jasperMode, $currentTab, $currentTool );
  1141.         }
  1142.  
  1143.         // Define the callback stuff
  1144.         string $selectCmd = "jasperTabMenuChange " + $jasperCommand + " " + $parent;
  1145.         tabLayout -e -sc $selectCmd $parent;
  1146.         jasperCallback( $jasperCommand, $currentTab, $cbParent, $colorSliderCB );
  1147.         jasperValues( $jasperCommand, `currentCtx`, $currentTab );
  1148.  
  1149.         waitCursor -state off;
  1150.     } else {
  1151.         updateJasperValues( $jasperCommand, `currentCtx`, $currentTab );
  1152.     }
  1153. }
  1154.  
  1155.  
  1156. proc string createUIOnDemandJasperTab( 
  1157.     string $parent,
  1158.     string $tabLabel 
  1159. {
  1160.     //    Create the child of the tab layout.
  1161.     //
  1162.     setParent $parent;
  1163.     
  1164.      string $tab = `frameLayout -width 365 -height 540 -bv false -lv false
  1165.              -collapse false -collapsable false $tabLabel`;
  1166.  
  1167.     //    Set the tab label for the child.
  1168.     //
  1169.     tabLayout -edit -tabLabel $tab $tabLabel $parent;    
  1170.  
  1171.     return $tab;
  1172. }
  1173.  
  1174.  
  1175. //
  1176. //
  1177. // $jasperMode == "putty", "wtPaint", "selectPaint", "userPaint"
  1178. // $section    == "sculpt"/"weight"/"select"/"script", "stroke"
  1179. //                  "seam", "mask", "file", "display", "misc"
  1180. //
  1181. global proc jasperProperties( 
  1182.     string $jasperMode,
  1183.     string $jasperCommand,
  1184.     string $callbackParent,
  1185.     string $colorSliderCB,                        
  1186.     int    $size,
  1187.     string $tabLabel[]
  1188. )
  1189. {
  1190.     //
  1191.     // create the tab layout for the tool editor
  1192.     //
  1193.     string $tabName = $jasperMode + "Tabs_L";
  1194.     string $fullTabName = `setParent -q` + "|" + $tabName;
  1195.  
  1196.     if( `tabLayout -ex $fullTabName` )
  1197.     {
  1198.  
  1199.     }
  1200.     else {
  1201.         string $tabParent = `tabLayout -width 365 -scr false -cr false $tabName`;
  1202.  
  1203.         //
  1204.         // create a callback function when the tab is selected
  1205.         //
  1206.         string $selectCmd = "loadJasperTabUI " + $jasperMode     + " " + 
  1207.                              $tabParent      + " " +
  1208.                              $jasperCommand  + " " +
  1209.                              $callbackParent + " " + 
  1210.                              $colorSliderCB;
  1211.         tabLayout -e -preSelectCommand ($selectCmd) $tabParent;
  1212.     
  1213.  
  1214.         //
  1215.         // create tab's children
  1216.         //
  1217.         int $i = 0;
  1218.         for( $i = 0; $i < $size; $i++ ) {    
  1219.             string $tab = `createUIOnDemandJasperTab $tabParent    $tabLabel[$i]`;
  1220.         }
  1221.  
  1222.         // 
  1223.         // load the first tab menu
  1224.         //
  1225.         loadJasperTabUI( $jasperMode, $tabParent, 
  1226.                  $jasperCommand, $callbackParent, $colorSliderCB 
  1227.         );
  1228.     }
  1229. }
  1230.